3.51 \(\int \cosh ^2(c+d x) (a+b \text{sech}^2(c+d x)) \, dx\)

Optimal. Leaf size=31 \[ \frac{1}{2} x (a+2 b)+\frac{a \sinh (c+d x) \cosh (c+d x)}{2 d} \]

[Out]

((a + 2*b)*x)/2 + (a*Cosh[c + d*x]*Sinh[c + d*x])/(2*d)

________________________________________________________________________________________

Rubi [A]  time = 0.0314004, antiderivative size = 31, normalized size of antiderivative = 1., number of steps used = 2, number of rules used = 2, integrand size = 21, \(\frac{\text{number of rules}}{\text{integrand size}}\) = 0.095, Rules used = {4045, 8} \[ \frac{1}{2} x (a+2 b)+\frac{a \sinh (c+d x) \cosh (c+d x)}{2 d} \]

Antiderivative was successfully verified.

[In]

Int[Cosh[c + d*x]^2*(a + b*Sech[c + d*x]^2),x]

[Out]

((a + 2*b)*x)/2 + (a*Cosh[c + d*x]*Sinh[c + d*x])/(2*d)

Rule 4045

Int[(csc[(e_.) + (f_.)*(x_)]*(b_.))^(m_.)*(csc[(e_.) + (f_.)*(x_)]^2*(C_.) + (A_)), x_Symbol] :> Simp[(A*Cot[e
 + f*x]*(b*Csc[e + f*x])^m)/(f*m), x] + Dist[(C*m + A*(m + 1))/(b^2*m), Int[(b*Csc[e + f*x])^(m + 2), x], x] /
; FreeQ[{b, e, f, A, C}, x] && NeQ[C*m + A*(m + 1), 0] && LeQ[m, -1]

Rule 8

Int[a_, x_Symbol] :> Simp[a*x, x] /; FreeQ[a, x]

Rubi steps

\begin{align*} \int \cosh ^2(c+d x) \left (a+b \text{sech}^2(c+d x)\right ) \, dx &=\frac{a \cosh (c+d x) \sinh (c+d x)}{2 d}+\frac{1}{2} (a+2 b) \int 1 \, dx\\ &=\frac{1}{2} (a+2 b) x+\frac{a \cosh (c+d x) \sinh (c+d x)}{2 d}\\ \end{align*}

Mathematica [A]  time = 0.0306696, size = 33, normalized size = 1.06 \[ \frac{a (c+d x)}{2 d}+\frac{a \sinh (2 (c+d x))}{4 d}+b x \]

Antiderivative was successfully verified.

[In]

Integrate[Cosh[c + d*x]^2*(a + b*Sech[c + d*x]^2),x]

[Out]

b*x + (a*(c + d*x))/(2*d) + (a*Sinh[2*(c + d*x)])/(4*d)

________________________________________________________________________________________

Maple [A]  time = 0.035, size = 37, normalized size = 1.2 \begin{align*}{\frac{1}{d} \left ( a \left ({\frac{\cosh \left ( dx+c \right ) \sinh \left ( dx+c \right ) }{2}}+{\frac{dx}{2}}+{\frac{c}{2}} \right ) + \left ( dx+c \right ) b \right ) } \end{align*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

int(cosh(d*x+c)^2*(a+b*sech(d*x+c)^2),x)

[Out]

1/d*(a*(1/2*cosh(d*x+c)*sinh(d*x+c)+1/2*d*x+1/2*c)+(d*x+c)*b)

________________________________________________________________________________________

Maxima [A]  time = 1.15954, size = 51, normalized size = 1.65 \begin{align*} \frac{1}{8} \, a{\left (4 \, x + \frac{e^{\left (2 \, d x + 2 \, c\right )}}{d} - \frac{e^{\left (-2 \, d x - 2 \, c\right )}}{d}\right )} + b x \end{align*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate(cosh(d*x+c)^2*(a+b*sech(d*x+c)^2),x, algorithm="maxima")

[Out]

1/8*a*(4*x + e^(2*d*x + 2*c)/d - e^(-2*d*x - 2*c)/d) + b*x

________________________________________________________________________________________

Fricas [A]  time = 1.97165, size = 74, normalized size = 2.39 \begin{align*} \frac{{\left (a + 2 \, b\right )} d x + a \cosh \left (d x + c\right ) \sinh \left (d x + c\right )}{2 \, d} \end{align*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate(cosh(d*x+c)^2*(a+b*sech(d*x+c)^2),x, algorithm="fricas")

[Out]

1/2*((a + 2*b)*d*x + a*cosh(d*x + c)*sinh(d*x + c))/d

________________________________________________________________________________________

Sympy [A]  time = 47.1013, size = 60, normalized size = 1.94 \begin{align*} a \left (\begin{cases} - \frac{x \sinh ^{2}{\left (c + d x \right )}}{2} + \frac{x \cosh ^{2}{\left (c + d x \right )}}{2} + \frac{\sinh{\left (c + d x \right )} \cosh{\left (c + d x \right )}}{2 d} & \text{for}\: d \neq 0 \\x \cosh ^{2}{\left (c \right )} & \text{otherwise} \end{cases}\right ) + b \left (\begin{cases} x & \text{for}\: \left |{x}\right | < 1 \\{G_{2, 2}^{1, 1}\left (\begin{matrix} 1 & 2 \\1 & 0 \end{matrix} \middle |{x} \right )} +{G_{2, 2}^{0, 2}\left (\begin{matrix} 2, 1 & \\ & 1, 0 \end{matrix} \middle |{x} \right )} & \text{otherwise} \end{cases}\right ) \end{align*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate(cosh(d*x+c)**2*(a+b*sech(d*x+c)**2),x)

[Out]

a*Piecewise((-x*sinh(c + d*x)**2/2 + x*cosh(c + d*x)**2/2 + sinh(c + d*x)*cosh(c + d*x)/(2*d), Ne(d, 0)), (x*c
osh(c)**2, True)) + b*Piecewise((x, Abs(x) < 1), (meijerg(((1,), (2,)), ((1,), (0,)), x) + meijerg(((2, 1), ()
), ((), (1, 0)), x), True))

________________________________________________________________________________________

Giac [B]  time = 1.21136, size = 89, normalized size = 2.87 \begin{align*} \frac{4 \,{\left (d x + c\right )}{\left (a + 2 \, b\right )} + a e^{\left (2 \, d x + 2 \, c\right )} -{\left (2 \, a e^{\left (2 \, d x + 2 \, c\right )} + 4 \, b e^{\left (2 \, d x + 2 \, c\right )} + a\right )} e^{\left (-2 \, d x - 2 \, c\right )}}{8 \, d} \end{align*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate(cosh(d*x+c)^2*(a+b*sech(d*x+c)^2),x, algorithm="giac")

[Out]

1/8*(4*(d*x + c)*(a + 2*b) + a*e^(2*d*x + 2*c) - (2*a*e^(2*d*x + 2*c) + 4*b*e^(2*d*x + 2*c) + a)*e^(-2*d*x - 2
*c))/d